{template 'common/header'}
<link rel="stylesheet" href="../addons/goouc_class/style/toast/css/toast.css">
<form action="" method="post" class="form-horizontal message" role="form" style="width:100%" onsubmit="return formcheck()">
	<p  class="list-group-item " style="background-color: #D9EDF7;margin:0 auto">请使用：阿里云视频点播功能，请开通阿里云视频点播功能</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">regionId(区域)</label>
			<div class="col-sm-10">
				<input type="text" name="regionId" value="{$settings['regionId']}" placeholder="请填写cn-shanghai"  class="form-control" style="width:98%"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">AccessKeyID</label>
			<div class="col-sm-10">
				<input type="text" name="AccessKeyID" value="{$settings[AccessKeyID]}" placeholder="请填写Access Key ID" class="form-control" style="width:98%"/>
			</div>
		</div>
		<div class="form-group">
			<label  class="col-sm-2 control-label">AccessKeySecret</label>
			<div class="col-sm-10">
				<input type="text" name="AccessKeySecret" value="{$settings[AccessKeySecret]}"  placeholder="请填写Access Key Secret" class="form-control" style="width:98%"/>
			</div>
		</div>
	</div>

	<p  class="list-group-item " style="background-color: #D9EDF7;margin:0 auto">请使用：阿里大鱼短信平台；此信息关系到用户短信验证码接收，请谨慎填写</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label class="col-sm-2 control-label">accessKeyId</label>
			<div class="col-sm-10">
				<input type="text" name="accessKeyId" value="{$settings['accessKeyId']}"  placeholder="请填写阿里大鱼accessKeyId"  class="form-control" style="width:98%"/>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">accessKeySecret</label>
			<div class="col-sm-10">
				<input type="text" name="accessKeySecret" value="{$settings['accessKeySecret']}"  placeholder="请填写accessKeySecret"  class="form-control" style="width:98%"/>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">SignName</label>
			<div class="col-sm-10">
				<input type="text" name="SignName" value="{$settings['SignName']}"  placeholder="请填写SignName"  class="form-control" style="width:98%"/>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">TemplateCode</label>
			<div class="col-sm-10">
				<input type="text" name="TemplateCode" value="{$settings['TemplateCode']}"  placeholder="请填写TemplateCode"  class="form-control" style="width:98%"/>
			</div>
		</div>
	</div>
	<!-- 兑换币设置 -->
	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">兑换币机制<span style="color:red">默认为关闭状态，若有需要请开启,开启后默认发放数量最小为1</span></p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px;">
			<label class="col-sm-2 control-label">每年兑课券可兑换次数</label>
			<div class="col-sm-10">
				<input type="number" class="form-control" id="cardnum" name="cardnum" min="0" value="{if empty($settings['cardnum'])}4{else}{$settings['cardnum']}{/if}" placeholder="填写兑换币使用规则" style="width:98%">
				<span class="help-block">用户每年兑换兑课券次数限制，默认4次</span>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px;">
			<label class="col-sm-2 control-label">兑换币使用规则</label>
			<div class="col-sm-10">
				<!--<input type="text" class="form-control" name="role" value="{$settings['role']}" placeholder="填写兑换币使用规则" style="width:98%">-->
				<textarea name="role"  cols="30" rows="10" class="form-control" style="width:98%">{$settings['role']}</textarea>
				<span class="help-block">兑换币使用规则“;(英文)”标识换行</span>
			</div>
		</div>
		<div class="form-group " style="margin-top: 25px">
			<label  class="col-sm-2 control-label">注册奖励设置</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<label class="radio-inline">
					<input type="radio" name="nstatus" onclick="$('.new_card').show()" value="1" title="发放" {if $settings['nstatus'] == '1'}checked="checked"{/if} > 发放
				</label>
				<label class="checkbox-inline">
					<input type="radio" name="nstatus" onclick="$('.new_card').hide()" value="0" title="不发放" {if $settings['nstatus'] == '0' || empty($settings['nstatus'])}checked="checked"{/if} > 不发放
				</label>
				<span class="help-block">开启后新用户登录将会获得指定数量的兑换币</span>
			</div>
		</div>
		<div class="form-group new_card" style="margin-top:25px;{if $settings['nstatus'] == 0}display:none{/if}">
			<label class="col-sm-2 control-label">奖励数量</label>
			<div class="col-sm-10">
				<input type="number" name="nnum" value="{if empty($settings['nnum'])}1{else}{$settings['nnum']}{/if}" min="1"  class="form-control" style="width:98%" />
				<span class="help-block">新注册用户在首次登陆后可获得的兑换币奖励</span>
			</div>
		</div>
		<div class="form-group " style="margin-top: 25px">
			<label  class="col-sm-2 control-label">签到奖励设置</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<label class="radio-inline">
					<input type="radio" name="lstatus" onclick="$('.login_card').show()" value="1" title="可领取" {if $settings['lstatus'] == '1'}checked{/if} > 开启
				</label>
				<label class="checkbox-inline">
					<input type="radio" name="lstatus" onclick="$('.login_card').hide()" value="0" title="不发放" {if $settings['lstatus'] == '0' || empty($settings['lstatus'])}checked{/if} > 关闭
				</label>
				<span class="help-block">开启后用户签到可获得指定数量的兑换币</span>
			</div>
		</div>
		<div class="form-group login_role" style="margin-top:25px;{if $settings['lstatus'] == 0}display:none{/if}">
			<label  class="col-sm-2 control-label">签到规则</label>
			<div class="col-sm-10">
				<input type="text" name="lrole" value="{if empty($settings['lrole'])}{else}{$settings['lrole']}{/if}" min="1"   class="form-control" style="width:98%"/>
				<span class="help-block">签到规则“;(英文)”标识换行</span>
			</div>
		</div>
		<div class="form-group login_card" style="margin-top:25px;{if $settings['lstatus'] == 0}display:none{/if}">
			<label  class="col-sm-2 control-label">签到奖励/每日</label>
			<div class="col-sm-10">
				<input type="number" name="lnum" value="{if empty($settings['lnum'])}1{else}{$settings['lnum']}{/if}" min="1"   class="form-control" style="width:98%"/>
				<span class="help-block">用户每日签到获得兑换币数量</span>
			</div>
		</div>
		<div class="form-group login_card" style="margin-top:25px;{if $settings['lstatus'] == 0}display:none{/if}">
			<label  class="col-sm-2 control-label">连续签到次数/每月</label>
			<div class="col-sm-10">
				<input type="number" name="lday" value="{if empty($settings['lday'])}30{else}{$settings['lday']}{/if}" min="1"   class="form-control" style="width:98%" placeholder="单位为天" />
				<span class="help-block">默认为连续签到30天可获取1个兑换币</span>
			</div>
		</div>
		<div class="form-group login_card" style="margin-top:25px;{if $settings['lstatus'] == 0}display:none{/if}">
			<label  class="col-sm-2 control-label">连续签到奖励/每月</label>
			<div class="col-sm-10">
				<input type="number" name="ldnum" value="{if empty($settings['ldnum'])}1{else}{$settings['ldnum']}{/if}" min="1"   class="form-control" style="width:98%" placeholder="单位为张" />
				<span class="help-block">用户达到连续签到天数后可获得兑换币数量</span>
			</div>
		</div>

		<div class="form-group " style="margin-top: 25px">
			<label  class="col-sm-2 control-label">分享设置</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<label class="radio-inline">
					<input type="radio" name="sstatus" value="1" onclick="$('.shar_card,.shar_card_num').show()" title="开启" {if $settings['sstatus'] == '1'}checked{/if} > 开启
				</label>
				<label class="checkbox-inline">
					<input type="radio" name="sstatus" value="0" onclick="$('.shar_card,.shar_card_num').hide()" title="关闭" {if $settings['sstatus'] == '0' || empty($settings['sstatus'])}checked{/if} > 关闭
				</label>
				<span class="help-block">开启分享机制后用户可通过分享获得兑换币，默认关闭</span>
			</div>
		</div>
		<div class="form-group shar_card" style="margin-top:25px;{if $settings['sstatus'] == 0}display:none{/if}">
			<label  class="col-sm-2 control-label">分享次数/每日</label>
			<div class="col-sm-10">
				<input type="number" name="snumber" value="{if empty($settings['snumber'])}1{else}{$settings['snumber']}{/if}" min="1" class="form-control" style="width:98%"/>
				<span class="help-block">分享次数上限后将不再获得兑换币</span>
			</div>
		</div>
		<div class="form-group shar_card_num" style="margin-top:25px;{if $settings['sstatus'] == 0}display:none{/if}">
			<label  class="col-sm-2 control-label">分享奖励/每日</label>
			<div class="col-sm-10">
				<input type="number" name="snum" value="{if empty($settings['snum'])}1{else}{$settings['snum']}{/if}" min="1"   class="form-control" style="width:98%"/>
				<span class="help-block">每次分享用户获得奖励的兑换币数量</span>
			</div>
		</div>
		<div class="form-group shar_card" style="margin-top:25px;{if $settings['sstatus'] == 0}display:none{/if}">
			<label  class="col-sm-2 control-label">奖励上限/每日</label>
			<div class="col-sm-10">
				<input type="number" name="zsnum" value="{if empty($settings['zsnum'])}1{else}{$settings['zsnum']}{/if}" min="1" class="form-control" style="width:98%"/>
				<span class="help-block">分享者每天由分享可获得兑换币最高上限张数，达到上限后不再获取兑换币</span>
			</div>
		</div>
	</div>

	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">兑换币任务<span style="color:red">设置用户完任务获得兑换币数量</span></p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group " style="margin-top: 25px">
			<label  class="col-sm-2 control-label">任务一：设置头像</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<input type="number" name="setheaderimg" class="form-control"  value="{if empty($settings['setheaderimg'])}1{else}{$settings['setheaderimg']}{/if}" style="width:98%">
				<span class="help-block">用户设置头像后可获得兑换币数量</span>
			</div>
		</div>
		<div class="form-group " style="margin-top: 25px">
			<label  class="col-sm-2 control-label">任务二：完善信息</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<input type="number" name="setuserinfo" class="form-control"  value="{if empty($settings['setuserinfo'])}1{else}{$settings['setuserinfo']}{/if}" style="width:98%">
				<span class="help-block">用户完善信息后可获得兑换币数量</span>
			</div>
		</div>
		<div class="form-group " style="margin-top: 25px">
			<label  class="col-sm-2 control-label">任务三：购买课程</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<input type="number" name="paylesson" class="form-control"  value="{if empty($settings['paylesson'])}1{else}{$settings['paylesson']}{/if}" style="width:98%">
				<span class="help-block">用户每次购买课程可获得兑换币数量</span>
			</div>
		</div>
		<div class="form-group " style="margin-top: 25px">
			<label  class="col-sm-2 control-label">任务四：按时上课</label>
			<div class=" col-sm-10" >
				<div class="col-md-5 ">
					<label  class="col-sm-4 control-label">单次获得数量</label>
					<div class="col-sm-8">
						<input type="number" name="studylesson" class="form-control"  value="{if empty($settings['studylesson'])}2{else}{$settings['studylesson']}{/if}" >
						<span class="help-block">按时参加已报名课程可获得兑换币数量</span>
					</div>
				</div>
				<div class="col-md-5 ">
					<label  class="col-sm-4 control-label">每周上限</label>
					<div class="col-sm-8">
						<input type="number" name="studylessonmax" class="form-control"  value="{if empty($settings['studylessonmax'])}8{else}{$settings['studylessonmax']}{/if}" >
						<span class="help-block">每周可获得最大值</span>
					</div>
				</div>
			</div>
		</div>
		<div class="form-group " style="margin-top: 25px">
			<label  class="col-sm-2 control-label">任务五：查看回放</label>
			<div class=" col-sm-10" >
				<div class="col-md-5 ">
					<label  class="col-sm-4 control-label">单次获得数量</label>
					<div class="col-sm-8">
						<input type="number" name="lookoldlesson" class="form-control"  value="{if empty($settings['lookoldlesson'])}1{else}{$settings['lookoldlesson']}{/if}" >
						<span class="help-block">每次回顾已学习视频可获得兑换币数量</span>
					</div>
				</div>
				<div class="col-md-5 ">
					<label  class="col-sm-4 control-label">每周上限</label>
					<div class="col-sm-8">
						<input type="number" name="lookoldlessonmax" class="form-control"  value="{if empty($settings['lookoldlessonmax'])}7{else}{$settings['lookoldlessonmax']}{/if}" >
						<span class="help-block">每周可获得最大值</span>
					</div>
				</div>
			</div>
		</div>
	</div>

	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">支付设置<span style="color:red">若不开启支付，课程与章节价格默认为0.00元</span></p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">是否开启支付功能</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<label class="radio-inline">
					<input type="radio" name="pay_status" value="1" onclick="$('.hkg_payset').show()" title="开启" {if $settings['pay_status'] == '1'}checked{/if} > 开启
				</label>
				<label class="checkbox-inline">
					<input type="radio" name="pay_status" value="0" onclick="$('.hkg_payset').hide()" title="关闭" {if $settings['pay_status'] == '0' || empty($settings['pay_status'])}checked{/if} > 关闭
				</label>
			</div>
			<span style='color: #cecece;font-size: 14px;margin-left: 244px'>开启支付功能后请填写商户号以及支付秘钥</span>
		</div>
		<div class="form-group hkg_payset" style="margin-top:25px;{if $settings['pay_status']==0}display:none{/if}">
			<label  class="col-sm-2 control-label">商户号</label>
			<div class="col-sm-10">
				<input type="text" name="mchid" value="{$settings['mchid']}" class="form-control" style="width:98%"/>
			</div>
		</div>
		<div class="form-group hkg_payset" style="margin-top:25px;{if $settings['pay_status']==0}display:none{/if}">
			<label  class="col-sm-2 control-label">支付秘钥</label>
			<div class="col-sm-10">
				<input type="text" name="pay_secret" value="{$settings['pay_secret']}" class="form-control" style="width:98%"/>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">团购失败自动退款</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<label class="radio-inline">
					<input type="radio" name="refund_status" onclick="$('.payfile').show()" value="1" title="开启" {if $settings['refund_status'] == '1'}checked{/if} > 开启
				</label>
				<label class="checkbox-inline">
					<input type="radio" name="refund_status" onclick="$('.payfile').hide()" value="0" title="关闭" {if $settings['refund_status'] == '0' || empty($settings['refund_status'])}checked{/if} > 关闭
				</label>
			</div>
		</div>
		<div class="panel-body payfile" style="width: 1022px;{if $settings['refund_status']==0}display:none{/if}">
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">选择key文件</label>
				<div class="col-sm-9 col-xs-12">
					<div class="btn btn-info" style="display:inline-block;width: 100px;padding: 0;height: 36px;font-size: 14px;text-align:center;line-height: 36px;position: relative;">key文件
						<input type="file" onchange="submitF('wxpaykey');" class="pull-left btn-default" name="wxpaykey" value="{$settings['wxpaykey']}" id="wxpaykey" style="opacity: 0;position: absolute;width: 100%;height: 100%;top:0;">
					</div>
					<input type="text" name="wxkey" value="{$settings['wxkey']}" id="wxkey" hidden>
					{if $settings['wxpaykey'] != ''}
					<span>已上传</span>
					{/if}
				</div>
			</div>

			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">选择cert文件</label>
				<div class="col-sm-9 col-xs-12">
					<div class="btn btn-info" style="display:inline-block;width: 100px;padding: 0;height: 36px;font-size: 14px;text-align:center;line-height: 36px;position: relative;">cert文件
						<input type="file" onchange="submitF('wxpaycert');" class="pull-left btn-default" name="wxpaycert" value="{$settings['wxpaycert']}" id="wxpaycert" style="opacity: 0;position: absolute;width: 100%;height: 100%;top:0;">
					</div>
					<input type="text" name="wxcert" value="{$settings['wxcert']}" id="wxcert" hidden>
					{if $settings['wxpaycert'] != ''}
					<span>已上传</span>
					{/if}
				</div>
			</div>
		</div>
	</div>

	<!--<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">报名咨询设置</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">咨询电话</label>
			<div class="col-sm-10">
				<input type="text" name="number" value="{$settings['number']}" class="form-control" onkeyup="value=value.replace(/[^\d\-\d]/g,'')" style="width:98%" maxlength=20/>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">咨询链接</label>
			<div class="col-sm-10">
				<input type="text" name="about" value="{$settings['about']}" class="form-control"  style="width:98%" />
			</div>
		</div>
	</div>-->
	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">拼团设置</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">有效期</label>
			<div class="col-sm-10">
				<input type="text" name="validtime" value="{if empty($settings['validtime'])}1440{else}{$settings['validtime']}{/if}" class="form-control"  style="width:98%" maxlength=20 onblur="if($(this).val() <= 0){$(this).val(1)}"/>
				<span class="help-block">每个团的有效时间，单位为小时,最小为1个小时</span>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">团人数</label>
			<div class="col-sm-10">
				<input type="number" name="groupnum" value="{if empty($settings['groupnum'])}3{else}{$settings['groupnum']}{/if}" class="form-control"  style="width:98%" onblur="if($(this).val() > 5){$(this).val(5)};if($(this).val() < 3){$(this).val(3)}"/>
				<span class="help-block">达到人数后才能完成拼团,最少为3人团,最多为5人团</span>
			</div>
		</div>
	</div>
	<!--<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">聊天室服务IP</p>-->
	<!--<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">-->
		<!--<div class="form-group" style="margin-top:25px">-->
			<!--<label  class="col-sm-2 control-label">IP</label>-->
			<!--<div class="col-sm-10">-->
				<!--<input type="text" name="ip" value="{if empty($settings['ip'])}1440{else}{$settings['ip']}{/if}" class="form-control"  style="width:98%" maxlength=20 />-->
				<!--<span class="help-block">请填写聊天室服务的IP以及端口号，例如:192.168.1.1:8812</span>-->
			<!--</div>-->
		<!--</div>-->
	<!--</div>-->

	<!--<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">H5公众号参数设置</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">appid</label>
			<div class="col-sm-10">
				<input type="text" name="h5_appid" value="{if empty($settings['h5_appid'])}{else}{$settings['h5_appid']}{/if}" class="form-control"  style="width:98%"  />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">appsecret</label>
			<div class="col-sm-10">
				<input type="text" name="h5_appsecret" value="{if empty($settings['h5_appsecret'])}{else}{$settings['h5_appsecret']}{/if}" class="form-control"  style="width:98%" />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group  remd" style="margin-top:25px">
			<label  class="col-sm-2 control-label">H5入口链接</label>
			<div class="col-sm-10">
				<input type="text" id = 'h5url' name="h5url" value="{$_W['siteroot']}addons/goouc_class/vue/index.html?i={$_W['uniacid']}/home" class="form-control"  style="width:60%;float: left;"  readonly/>
				<input id="copyUrl"  value="复制链接" class="btn btn-info" style="float: left;margin-left: 20px;" >
				<span class="help-block"></span>
			</div>
		</div>

	</div>-->
	<!--<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">H5分享设置</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">分享描述</label>
			<div class="col-sm-10">
				<input type="text" name="sharetitle" value="{if empty($settings['sharetitle'])}{else}{$settings['sharetitle']}{/if}" class="form-control"  style="width:98%"  />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group">
			<label  class="col-sm-2 control-label">icon图标</label>
			<div class="col-sm-10">
				{php echo tpl_form_field_image('shareicon',$settings['shareicon'])}
				<span class="help-block">图标尺寸是：100*100</span></span>
			</div>
		</div>
	</div>-->

	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">直播参数设置</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">推流域名</label>
			<div class="col-sm-10">
				<input type="text" name="live_url" value="{if empty($settings['live_url'])}{else}{$settings['live_url']}{/if}" class="form-control"  style="width:98%"  />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">播流域名</label>
			<div class="col-sm-10">
				<input type="text" name="broad_url" value="{if empty($settings['broad_url'])}{else}{$settings['broad_url']}{/if}" class="form-control"  style="width:98%" />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">APPName</label>
			<div class="col-sm-10">
				<input type="text" name="appname" value="{if empty($settings['appname'])}{else}{$settings['appname']}{/if}" class="form-control"  style="width:98%" />
				<span class="help-block">请输入英文名称</span>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">bucket名称</label>
			<div class="col-sm-10">
				<input type="text" name="bucketname" value="{if empty($settings['bucketname'])}{else}{$settings['bucketname']}{/if}" class="form-control"  style="width:98%" />
				<span class="help-block">请输入阿里云上创建的英文名称</span>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">Endpoint</label>
			<div class="col-sm-10">
				<input type="text" name="endpoint" value="{if empty($settings['endpoint'])}{else}{$settings['endpoint']}{/if}" class="form-control"  style="width:98%" />
			</div>
		</div>
	</div>
	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">习题开关设置<span style="color:red">若不开启习题，习题内容则不显示</span></p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">是否开启习题功能</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<label class="radio-inline">
					<input type="radio" name="practice_status" value="1" title="开启" {if $settings['practice_status'] == '1'}checked{/if} > 开启
				</label>
				<label class="checkbox-inline">
					<input type="radio" name="practice_status" value="0" title="关闭" {if $settings['practice_status'] == '0' || empty($settings['practice_status'])}checked{/if} > 关闭
				</label>
			</div>
		</div>
	</div>
	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">订阅消息开关<span style="color:red">若不开启，学生收不到提醒信息</span></p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">是否开启作业提醒功能</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<label class="radio-inline">
					<input type="radio" name="practice_remind" onclick="$('.remind').show()" value="1" title="开启" {if $settings['practice_remind'] == '1'}checked{/if} > 开启
				</label>
				<label class="checkbox-inline">
					<input type="radio" name="practice_remind" onclick="$('.remind').hide()" value="0" title="关闭" {if $settings['practice_remind'] == '0' || empty($settings['practice_remind'])}checked{/if} > 关闭
				</label>
			</div>
		</div>
		<div class="form-group remind" style="margin-top:25px;{if $settings['practice_remind']==0}display:none{/if}">
			<label  class="col-sm-2 control-label">布置作业模板id</label>
			<div class="col-sm-10">
				<input type="text" name="templateid" value="{if empty($settings['templateid'])}{else}{$settings['templateid']}{/if}" class="form-control"  style="width:98%"  />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group remind" style="margin-top:25px;{if $settings['practice_remind']==0}display:none{/if}">
			<label  class="col-sm-2 control-label">作业未完成模板id</label>
			<div class="col-sm-10">
				<input type="text" name="ntemplateid" value="{if empty($settings['ntemplateid'])}{else}{$settings['ntemplateid']}{/if}" class="form-control"  style="width:98%"  />
				<span class="help-block"></span>
			</div>
		</div>
	</div>
	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">短信消息开关<span style="color:red">若不开启不发送短信消息</span></p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">是否开启短信消息</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<label class="radio-inline">
					<input type="radio" name="duanxin_status" onclick="$('.reminds').show()" value="1" title="开启" {if $settings['duanxin_status'] == '1'}checked{/if} > 开启
				</label>
				<label class="checkbox-inline">
					<input type="radio" name="duanxin_status" onclick="$('.reminds').hide()" value="0" title="关闭" {if $settings['duanxin_status'] == '0' || empty($settings['duanxin_status'])}checked{/if} > 关闭
				</label>
			</div>
		</div>
		<div class="form-group reminds" style="margin-top:25px;{if $settings['duanxin_status']==0}display:none{/if}">
			<label  class="col-sm-2 control-label">短信布置作业TemplateCode</label>
			<div class="col-sm-10">
				<input type="text" name="TemplateCode1" value="{if empty($settings['TemplateCode1'])}{else}{$settings['TemplateCode1']}{/if}" class="form-control"  style="width:98%"  />
				<span class="help-block">布置作业提醒</span>
			</div>
		</div>
		<div class="form-group reminds" style="margin-top:25px;{if $settings['duanxin_status']==0}display:none{/if}">
			<label  class="col-sm-2 control-label">短信提醒TemplateCode</label>
			<div class="col-sm-10">
				<input type="text" name="TemplateCode2" value="{if empty($settings['TemplateCode2'])}{else}{$settings['TemplateCode2']}{/if}" class="form-control"  style="width:98%"  />
				<span class="help-block">作业未完成提醒</span>
			</div>
		</div>
	</div>
	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">网站参数设置</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">学院名称</label>
			<div class="col-sm-10">
				<input type="text" name="webname" value="{if empty($settings['webname'])}{else}{$settings['webname']}{/if}" class="form-control"  style="width:98%"  />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">兑换币名称</label>
			<div class="col-sm-10">
				<input type="text" name="iconname" value="{if empty($settings['iconname'])}{else}{$settings['iconname']}{/if}" class="form-control"  style="width:98%" />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">币名图标文字</label>
			<div class="col-sm-10">
				<input type="text" name="icontitle" value="{if empty($settings['icontitle'])}{else}{$settings['icontitle']}{/if}" class="form-control"  style="width:98%" />
				<span class="help-block">例如：币</span>
			</div>
		</div>
	</div>
	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">classin直播参数设置</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">是否开启classin直播</label>
			<div class=" col-sm-10" style="padding-left:25px">
				<label class="radio-inline">
					<input type="radio" name="classin_status" onclick="$('.classin').show()" value="1" title="开启" {if $settings['classin_status'] == '1'}checked{/if} > 开启
				</label>
				<label class="checkbox-inline">
					<input type="radio" name="classin_status" onclick="$('.classin').hide()" value="0" title="关闭" {if $settings['classin_status'] == '0' || empty($settings['classin_status'])}checked{/if} > 关闭
				</label>
			</div>
		</div>
		<div class="form-group classin" style="margin-top:25px;{if $settings['classin_status']==0}display:none{/if}">
			<label  class="col-sm-2 control-label">SID</label>
			<div class="col-sm-10">
				<input type="text" name="SID" value="{if empty($settings['SID'])}{else}{$settings['SID']}{/if}" class="form-control"  style="width:98%"  />
			</div>
		</div>
		<div class="form-group classin" style="margin-top:25px;{if $settings['classin_status']==0}display:none{/if}">
			<label  class="col-sm-2 control-label">SECRET</label>
			<div class="col-sm-10">
				<input type="text" name="SECRET" value="{if empty($settings['SECRET'])}{else}{$settings['SECRET']}{/if}" class="form-control"  style="width:98%"  />
			</div>
		</div>
	</div>
	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">极光参数</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px;">
			<label  class="col-sm-2 control-label">AppKey</label>
			<div class="col-sm-10">
				<input type="text" name="jmkey" value="{if empty($settings['jmkey'])}{else}{$settings['jmkey']}{/if}" class="form-control"  style="width:98%"  />
			</div>
		</div>
		<div class="form-group" style="margin-top:25px;">
			<label  class="col-sm-2 control-label">MasterSecret</label>
			<div class="col-sm-10">
				<input type="text" name="jmsecret" value="{if empty($settings['jmsecret'])}{else}{$settings['jmsecret']}{/if}" class="form-control"  style="width:98%"  />
			</div>
		</div>
	</div>
	<input type="hidden" name="token" value="{$_W['token']}">
	<div style="float: right;margin:10px">
		<input type="submit" name="submit" value="保存设置" class="btn btn-info" >
	</div>
	<div style="clear: both;"></div>
</form>
<script src="../addons/goouc_class/style/toast/js/toast.js"></script>
<script>
	function submitF(el) {
		let formData = new FormData();
		let fs = document.getElementById(el).files[0];
		formData.append(el,fs);
		//console.log(formData);
		$.ajax({
			type: 'post',
			url: "{php echo $this->createWebUrl('upload')}",
			data:formData,
			processData: false,   // jQuery不要去处理发送的数据
			contentType: false,   // jQuery不要去设置Content-Type请求头
			success: function (res) {
				let re = JSON.parse(res);
				if(re.status == 1){
					if(el == 'wxpaykey'){
						$('#wxkey').val(re.url);
					}else{
						$('#wxcert').val(re.url);
					}
				}else{
					$('.message').toast({
						content:re.msg,
						duration:1000
					});
					return false;
				}
			}
		});
	}
    $('#copyUrl').on('click',function(){
        copyUrl($(this));
    });
    function copyUrl (obj){
        if($('#urlText').length == 0){
            var url =$('#h5url').val();

            // 创建input
            obj.after('<input id="urlText" style="position:fixed;top:-200%;left:-200%;" type="text" value=' +url + '>');
        }
        $('#urlText').select(); //选择对象
        document.execCommand("Copy"); //执行浏览器复制命令
		$('.remd').toast({
			content:'复制链接成功',
			duration:1500
		});
		return false;

    }
</script>
{template 'common/footer'}